import type { App } from 'vue';

// Import only the components that are used in the project
import { 
  Button, 
  Input, 
  Form, 
  Card, 
  Checkbox, 
  ConfigProvider, 
  Layout, 
  Menu, 
  Dropdown, 
  Tabs, 
  Modal, 
  Select, 
  Upload, 
  Row, 
  Col, 
  Steps, 
  PageHeader, 
  Image,
  Pagination,
  Table,
  Badge,
  Drawer,
  Rate
} from 'ant-design-vue';

// Use CSS reset instead of individual style imports
import 'ant-design-vue/dist/reset.css';

// Import message, notification and other non-component APIs
import { message, notification } from 'ant-design-vue';

// Create a function to register all components
export function setupAntd(app: App): void {
  // Register components
  app.use(Button);
  app.use(Input);
  app.use(Form);
  app.use(Card);
  app.use(Checkbox);
  app.use(ConfigProvider);
  app.use(Layout);
  app.use(Menu);
  app.use(Dropdown);
  app.use(Tabs);
  app.use(Modal);
  app.use(Select);
  app.use(Upload);
  app.use(Row);
  app.use(Col);
  app.use(Steps);
  app.use(PageHeader);
  app.use(Image);
  app.use(Pagination);
  app.use(Table);
  app.use(Badge);
  app.use(Drawer);
  app.use(Rate);

  // Make message and notification available globally
  app.config.globalProperties.$message = message;
  app.config.globalProperties.$notification = notification;
}

// Export commonly used APIs for direct import
export { message, notification }; 